package cn.doitedu.vueapi.service.tg;

import cn.doitedu.vueapi.dao.tg.AdGenRecMapper;
import cn.doitedu.vueapi.pojo.tg.AdGenRec;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdGenRecServieImpl {

    @Autowired
    AdGenRecMapper adGenRecMapper;

    public AdGenRec getMyAd(Integer uid, Integer adid){

        AdGenRec para = new AdGenRec();
        para.setAdid(adid);
        para.setUid(uid);

        List<AdGenRec> adGenRecs = adGenRecMapper.selectByAdGenRec(para);
        if(adGenRecs != null && adGenRecs.size()>0) {
            return adGenRecs.get(0);
        }else{
            return null;
        }


    }

}
